import request from '@/utils/request'

let baseUrl =
  process.env.NODE_ENV === 'production' ? 'api/core' : 'http://172.16.0.14:8020'

export const getPlanList = (data: any) =>
  request({
    baseURL: baseUrl,
    url: '/channel/positionPlan/query',
    method: 'post',
    data
  })

export const addPositionPlan = (data?: any) =>
  request({
    baseURL: baseUrl,
    url: '/channel/positionPlan/add',
    method: 'post',
    data
  })

export const getPositionPlan = (data: number) =>
  request({
    baseURL: baseUrl,
    url: '/channel/positionPlan/' + data,
    method: 'get'
  })

export const updatePositionPlan = (data?: any) =>
  request({
    baseURL: baseUrl,
    url: '/channel/positionPlan/update',
    method: 'post',
    data
  })
